import request from '@/utils/request'

export default {
  getAllAuthorList(){
    return request({
      url:`/service_video/author/getAuthorList`,
      method:'get'

    })
  },

  getAuthorList(page,limit,authorQuery){
    return request({
      url:`/service_video/author/pageList/${page}/${limit}/`,  /*注意符号*/
      method:'post',
      /*会自动转换成json数据*/
      data:authorQuery
    })
  },
  deleteAuthorWithId(id){
    return request({
      url:`/service_video/author/deleteAuthor/${id}/`,
      method:'post'
    })
  },
  addAuthor(authors)
  {
    return request({
      url:`/service_video/author/insertAuthor/`,
      method:'post',
      data:authors
    })

  },
  getOneAuthor(id){
    return request({
      url:`/service_video/author/getAuthorWithId/${id}`,
      method:'get',
    })
  },
  editAuthor(author){
    return request({
      url:`/service_video/author/updateAuthor/`,
      method:'post',
      data:author
    })
  },
  deleteImage(url){
   return request({
     url:`/service_upload/file/deleteImage?url=${url}`,
     method:'get',

   })
  }
}
